package com.myz.feign;


import feign.codec.Decoder;
import feign.codec.Encoder;
import feign.jackson.JacksonDecoder;
import feign.jackson.JacksonEncoder;
import org.springframework.context.annotation.Bean;

/**
 * 使用JacksonEncoder() 和 JacksonDecoder()
 *
 * @author maoyz
 */
public class FeignJsonConfig {

    @Bean
    public Encoder encoder() {
        return new JacksonEncoder();
    }

    @Bean
    public Decoder decoder() {
        return new JacksonDecoder();
    }
}

